home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Bus / T-Z / VCR+(app+src) Folder / Sources / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-17  |  1.3 KB  |  66 lines  |  [TEXT/KAHL]

  1. #include "VCRplus.h"
  2. #define ScreenDepth(gdh)    ((*((*gdh)->gdPMap))->pixelSize)
  3. #define dragscreenmargin 4 /*for dragging windows, leave this many pixels on all sides*/
  4.  
  5.         long                    CODE_VALUE;
  6.  
  7.  
  8.         DialogPtr                theDialog;
  9.         unsigned long            myFreeMem;
  10.         unsigned long            start[480], leng[480] ;
  11.         vcrInfo                myVCR;
  12.  
  13. void    main(void)
  14. {
  15.         EventRecord            myEvent;
  16.         OSErr                myErr;
  17.         Handle                myMBar;
  18.         MCTableHandle            myMenuColors;
  19.         
  20.     //    Do all the usual initialization schtick.
  21.  
  22.     initApp();
  23.     initArrays();
  24.         
  25.     myMenuColors = GetMCInfo();
  26.     myMBar = GetNewMBar(1);
  27.     SetMenuBar(myMBar);
  28.     AddResMenu(GetMHandle(appleID),'DRVR');
  29.     DrawMenuBar();
  30.     SetMCInfo(myMenuColors);
  31.     
  32.     theDialog = GetNewDialog(130, 0L, (WindowPtr) -1L);
  33.     SetPort((CGrafPtr)theDialog);
  34.         
  35.     myErr = SetDialogDefaultItem(theDialog, dlgQUIT);
  36.     
  37.     SetUserItem(dlgOUTLINER,outLineItem);
  38.     putDateInDlg();
  39.     
  40.     SetWTitle((WindowPtr)theDialog, "\pVCR Plus Encoder / Decoder");
  41.     
  42.     DrawDialog(theDialog);
  43.     ShowWindow((WindowPtr)theDialog);
  44.     
  45.     myFreeMem = MaxBlock();
  46.  
  47.     while (TRUE)
  48.     {
  49.         if(WaitNextEvent(everyEvent,&myEvent, 10L,0L))
  50.         {
  51.             if ( IsDialogEvent( &myEvent) )
  52.                 doDlgEvt( &myEvent );
  53.             
  54.             switch ( myEvent.what )
  55.             {
  56.                 case mouseDown:
  57.                     handlemouse (myEvent);
  58.                     break;
  59.             }
  60.         
  61.         }    //    WaitNextEvent
  62.         TEIdle(((DialogPeek)theDialog)->textH);
  63.     }
  64. }
  65.  
  66.